<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="/css/public.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>
<body>
<form class="layui-form layuimini-form" lay-filter="exam-info" id="exam-form">
    <input type="hidden" name="id" class="layui-input">
    <input type="hidden" name="createDate" class="layui-input">

    <div class="layui-form-item">
        <label class="layui-form-label required">班级</label>
        <div class="layui-input-block">
            <select id="class-view" lay-filter="stu-class" name="classId" lay-verify="required"  lay-reqtext="请选择班级" lay-search="">
            </select>
            <div id="class-top"></div>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label required">考试科目</label>
        <div class="layui-input-block">
            <select id="course-view" lay-filter="course" name="courseId" lay-verify="required"  lay-search="" lay-reqtext="请选择科目">
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label required">考试名称</label>
        <div class="layui-input-block">
            <input type="text" name="examName" lay-verify="required"  lay-reqtext="考试名称不能为空" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label required">考试类型</label>
        <div class="layui-input-block">
            <select name="examType" lay-verify="required" lay-reqtext="请选择考试类型">
                <option value="">请选择</option>
                <option value="1">普通考试</option>
                <option value="2">单元考试</option>
                <option value="3">期中考试</option>
                <option value="4">期末考试</option>
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label required">考试时间</label>
        <div class="layui-input-inline">
            <input type="text" name="examDate" id="date" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label required">监考老师</label>
        <div class="layui-input-block">
            <select id="invigilator-view" lay-filter="invigilator" name="invigilatorId" lay-verify="required"  lay-search="" lay-reqtext="请选择监考老师">
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="saveBtn">确认保存</button>
        </div>
    </div>
</form>
<script src="/lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script src="/lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
<script src="/js/common/ac-common.js" charset="utf-8"></script>
<script src="/js/exam/edit.js"></script>

<script id="class-temp" type="text/html">
    <table class="layui-table class-top-body">
        <colgroup>
            <col width="120">
            <col>
        </colgroup>
        <tbody>
        <tr>
            <td>班主任：</td>
            <td>{{d.teacherName}}</td>
        </tr>
        <tr>
            <td>班级信息：</td>
            <td>{{d.className}}（{{d.grade}}年级{{d.stuClass}}班）</td>
        </tr>
        <tr>
            <td>课程信息：</td>
            <td>
                {{#  layui.each(d.courses, function(index, item){ }}
                《{{item.name}}》 任课老师：{{item.lecturerName}}<br>
                {{#  }); }}
            </td>
        </tr>
        </tbody>
    </table>
</script>

<script id="course-temp" type="text/html">
    <option value="">请选择</option>
    {{#  layui.each(d, function(index, item){ }}
    <option value="{{item.id}}">{{item.name}}（任课老师：{{item.lecturerName}}）</option>
    {{#  }); }}
</script>

<script id="invigilator-temp" type="text/html">
    <option value="">请选择</option>
    {{#  layui.each(d, function(index, item){ }}
    <option value="{{item.id}}">{{item.user.realName}}（{{item.roleName}}）</option>
    {{#  }); }}
</script>
</body>
</html>